package multiplayerShooter;

import java.awt.Graphics;
import java.awt.Image;
import imageLoader.ImageLoader;

public class Block implements Printable{
	protected int x;
	protected int y;
	private static Image block;
	static{
		block = ImageLoader.getImage("Bar.gif");
	}
	
	public Block(){}
	public Block(int x_, int y_) {
		this.x = x_;
		this.y = y_;		
	}

	public void printBlock(Graphics graph) {
		graph.drawImage(Block.block, this.x, this.y, null);
	}

	public boolean onBlock(int px, int py, Player player) {
		return (px > this.x + 9 && px < this.x + 145 && py == this.y + 12);
	}

	public void draw(Graphics g) {
		g.drawImage(Block.block, this.x, this.y, null);		
	}

	public boolean printItem() {
		return true;		
	}
}
